package com.nnnu.wsnackshop.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 配送表
 * </p>
 *
 * @author zk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("deliveries")
public class Deliveries implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 配送ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 配送方式：local=同城配送, self=自提
     */
    private String deliveryType;

    /**
     * 骑手ID
     */
    private Integer riderId;

    /**
     * 骑手联系电话
     */
    private String riderPhone;

    /**
     * 预计送达时间
     */
    private LocalDateTime estimatedArrivalTime;

    /**
     * 分配时间
     */
    private LocalDateTime assignedAt;

    /**
     * 取货时间
     */
    private LocalDateTime pickedUpAt;

    /**
     * 送达时间
     */
    private LocalDateTime deliveredAt;

    /**
     * 配送备注
     */
    private String deliveryNotes;

    /**
     * 配送评分（1-5分）
     */
    private Integer deliveryRating;

    /**
     * 状态：0=待分配, 1=配送中, 2=已送达, 3=配送异常
     */
    private Integer status;
}
